<ion-view view-title="售后订单池子">
  <ion-content>
    <ion-refresher on-refresh="doRefresh()"
                   pulling-text="下拉刷新..."
                   refreshing-text="拼命加载中..."
                   refreshing-icon="ion-loading-b">

    </ion-refresher>
    <div class="list" >
      <div class="card" ng-repeat="o in returnOrders">
        <div class="item">
          <h2>{{o.get('areaId') | area}}区 {{o.get('orderid')}}</h2>
        </div>
        <div class="item item-body">
          <p>订单状态：{{o.get('status') | orderState}}</p>
          <p>
            目的地：{{o.get('address').address}}
          </p>
          <!--<p>-->
            <!--收件人：{{o.get('address').name}} <a>{{o.get('address').phone}}</a>-->
          <!--</p>-->
          <!--<p>-->
            <!--果饮店：{{o.get('shopId') | shop}}-->
          <!--</p>-->
          <!--<p>-->
            <!--支付方式：{{o.get('payway')}}-->
          <!--</p>-->
          <!--下单时间：{{o.get('paytime') | date:"yyyy-MM-dd hh:mm:ss"}}-->
          <p>
            下单时间：{{o.get('paytime') | deltaDate}} 分钟前
          </p>
          <p>
            审核时间：{{(o.get('approvaldate') ||o.get('paytime')) | deltaDate }} 分钟前
          </p>
          <button ng-if="(o.get('messioned') !== true)" ng-disabled="o.get('messioned')===true"class="button button-block button-assertive" ng-click="rush(event,o,$index)">我抢</button>
          <button ng-if="(o.get('messioned') === true)" class="button button-block button-balanced" >已抢</button>
        </div>
      </div>
    </div>
    <div ng-if="(returnOrders.length === 0)" class="card">
      <div class="item item-text-wrap">
        啥都没有~何不下拉刷新试试?
      </div>
    </div>

    <!--<ion-infinite-scroll ng-if="hasMore" on-infinite="loadMore()" distance="1%" ></ion-infinite-scroll>-->
  </ion-content>
</ion-view>
